<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:78:"D:\wwwroot\fangcms_city_add\public/../application/mobile\view\index\house.html";i:1493802851;s:80:"D:\wwwroot\fangcms_city_add\public/../application/mobile\view\public\layout.html";i:1493803137;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title><?php echo $seo['title']; ?></title>
    <meta name="Keywords" content="<?php echo $seo['keys']; ?>">
    <meta name="Description" content="<?php echo $seo['desc']; ?>">
    <link rel="stylesheet" href="__CSS__/amazeui.min.css"/>
    <link type="text/css" rel="stylesheet"  href="__CSS__/main.css"/>
    <link rel="stylesheet" href="__CSS__/mobile.css">
    <script src="__PUBLIC__/js/jquery.min.js"></script>
    <script>
        var page = 1,flag  = true,params =  {page: page};
    </script>
</head>
<body>

<header data-am-widget="header" class="am-header am-header-default">
    <div class="am-header-left am-header-nav">
        <a href="<?php echo url('Index/index@m'); ?>" class="am-btn  am-round am-icon-map-marker">
        <?php echo $cityInfo['name']; ?>
        </a>
    </div>
    <h1 class="am-header-title">
        <img src="<?php echo $site['mobileLogo']; ?>" alt="">
    </h1>
    <div class="am-header-right am-header-nav">
        <a href="#right-link" class="">
            <i class="am-header-icon am-icon-home"></i>
        </a>
    </div>
</header>


<script src="__JS__/amazeui.min.js"></script>
<div data-am-widget="slider" class="am-slider am-slider-a1" data-am-slider='{"directionNav":false}' >
    <ul class="am-slides">
        <?php if(is_array($slides) || $slides instanceof \think\Collection || $slides instanceof \think\Paginator): $i = 0; $__LIST__ = $slides;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
        <li>
            <?php echo $vo; ?>
        </li>
        <?php endforeach; endif; else: echo "" ;endif; ?>
    </ul>
</div>
<div class="fang-content-categary fang-margin-tb">
    <ul class="am-avg-sm-4">
        <li>
            <a href="<?php echo url('Loupan/index'); ?>" title="新房">
                <span class="icon icon-house"></span>
                <span>新房</span>
            </a>
        </li>
        <li>
            <a href="<?php echo url('Tuangou/index'); ?>" title="团购">
                <span class="icon icon-group"></span>
                <span>团购</span>
            </a>
        </li>
        <li>
            <a href="<?php echo url('Second/index'); ?>" title="二手房">
                <span class="icon icon-second"></span>
                <span>二手房</span>
            </a>
        </li>
        <li>
            <a href="<?php echo url('Chuzu/index'); ?>" title="出租房">
                <span class="icon icon-rental"></span>
                <span>出租房</span>
            </a>
        </li>
        <li>
            <a href="<?php echo url('Xiaoqu/index'); ?>" title="小区">
                <span class="icon icon-estate"></span>
                <span>小区</span>
            </a>
        </li>
        <li>
            <a href="<?php echo url('Huodong/index'); ?>" title="活动">
                <span class="icon icon-activity"></span>
                <span>活动</span>
            </a>
        </li>
        <li>
            <a href="<?php echo url('Question/index'); ?>" title="问答">
                <span class="icon icon-question"></span>
                <span>问答</span>
            </a>
        </li>
        <li>
            <a href="<?php echo url('News/index'); ?>" title="资讯">
                <span class="icon icon-news"></span>
                <span>资讯</span>
            </a>
        </li>
    </ul>

</div>
<div class="fang-box fang-margin-b">
    <div class="fang-pannel">
        <a href="<?php echo url('Loupan/index'); ?>">更多></a>
        <span class="on">推荐楼盘</span>
    </div>
    <div class="lists-news-pic">
        <ul class="am-list">
            <?php if(is_array($house_position) || $house_position instanceof \think\Collection || $house_position instanceof \think\Paginator): $i = 0; $__LIST__ = $house_position;if( count($__LIST__)==0 ) : echo "<li>暂无数据</li>" ;else: foreach($__LIST__ as $key=>$data): $mod = ($i % 2 );++$i;?>
            <li>
                <a href="<?php echo url('Loupan/detail',['id'=>$data['house_id']]); ?>" title="<?php echo $data['title']; ?>" class="img"><img src="<?php echo $data['img']; ?>" onerror="this.src='__PUBLIC__/images/nopic.jpg'" alt="<?php echo $data['title']; ?>"></a>
                <dl>
                    <dt><a href="<?php echo url('Loupan/detail',['id'=>$data['house_id']]); ?>"><?php echo $data['title']; ?></a></dt>
                    <dd class="price"><span><?php echo $data['data']['average_price']; ?>元/m<sup>2</sup></span><?php echo $data['data']['city_name']; ?><?php echo $data['data']['area_name']; ?></dd>
                    <dd>地址:<?php echo $data['data']['address']; ?></dd>
                </dl>
            </li>
            <?php endforeach; endif; else: echo "<li>暂无数据</li>" ;endif; ?>

        </ul>
    </div>
</div>
<?php if(!(empty($group) || (($group instanceof \think\Collection || $group instanceof \think\Paginator ) && $group->isEmpty()))): ?>
<div class="fang-box fang-margin-b">
    <div class="fang-pannel">
        <a href="<?php echo url('Tuangou/index'); ?>">更多></a>
        <span class="on">团购楼盘</span>
    </div>
    <div class="lists-news-pic">
        <ul class="am-list">
            <?php if(is_array($group) || $group instanceof \think\Collection || $group instanceof \think\Paginator): $i = 0; $__LIST__ = $group;if( count($__LIST__)==0 ) : echo "<li>暂无数据</li>" ;else: foreach($__LIST__ as $key=>$data): $mod = ($i % 2 );++$i;?>
            <li>
                <a href="<?php echo url('Tuangou/detail',['id'=>$data['id']]); ?>" title="<?php echo $data['title']; ?>" class="img"><img src="<?php echo $data['img']; ?>" onerror="this.src='__PUBLIC__/images/nopic.jpg'" alt="<?php echo $data['title']; ?>"></a>
                <dl>
                    <dt><a href="<?php echo $data['title']; ?>"><?php echo $data['title']; ?></a></dt>
                    <dd class="price"><span>团购价<?php echo $data['price']; ?>元/m<sup>2</sup></span>已有 <em><?php echo $data['buy_num']; ?></em> 人报名</dd>
                    <dd><?php echo $data['youhui']; ?></dd>
                </dl>
            </li>
            <?php endforeach; endif; else: echo "<li>暂无数据</li>" ;endif; ?>

        </ul>
    </div>
</div>
<?php endif; if(!(empty($second_position) || (($second_position instanceof \think\Collection || $second_position instanceof \think\Paginator ) && $second_position->isEmpty()))): ?>
<div class="fang-box fang-margin-b">
    <div class="fang-pannel">
        <a href="<?php echo url('Second/index'); ?>">更多></a>
        <span class="on">二手房</span>
    </div>
    <div class="lists-news-pic">
        <ul class="am-list">
            <?php if(is_array($second_position) || $second_position instanceof \think\Collection || $second_position instanceof \think\Paginator): $i = 0; $__LIST__ = $second_position;if( count($__LIST__)==0 ) : echo "<li>暂无数据</li>" ;else: foreach($__LIST__ as $key=>$data): $mod = ($i % 2 );++$i;?>
            <li>
                <a href="<?php echo url('Second/detail',['id'=>$data['id']]); ?>" title="<?php echo $data['title']; ?>" class="img"><img src="<?php echo $data['img']; ?>" onerror="this.src='__PUBLIC__/images/nopic.jpg'" alt="<?php echo $data['title']; ?>"></a>
                <dl>
                    <dt><a href="<?php echo url('Second/detail',['id'=>$data['id']]); ?>"><?php echo $data['title']; ?></a></dt>
                    <dd class="price"><span><?php echo $data['total_price']; ?>万元</span><?php echo $data['room']; ?>室<?php echo $data['ting']; ?>厅<?php echo $data['wei']; ?>卫</dd>
                    <dd><?php echo $data['contact']; ?><?php echo $data['contact_phone']; ?></dd>
                </dl>
            </li>
            <?php endforeach; endif; else: echo "<li>暂无数据</li>" ;endif; ?>
        </ul>
    </div>
</div>
<?php endif; ?>
<div class="fang-box fang-margin-b">
    <div class="fang-pannel">
        <a href="<?php echo url('News/index'); ?>">更多></a>
        <span class="on">新闻资讯</span>
    </div>
    <div class="am-list-news-bd">
        <ul class="am-list">
            <?php $obj = model("article");$obj->where("status=1 and city=$cityid");$obj->field("id,title,create_time");$obj->order("ordid asc,id desc");$name = $obj->limit(5)->select();if(is_array( $name ) || $name  instanceof \think\Paginator): $i = 0; $__LIST__ = $name;if( count($__LIST__)==0 ) : echo "暂无数据" ;else: foreach($__LIST__ as $key=>$data): $mod = ($i % 2 );++$i;?>
            <li class="am-g am-list-item-dated">
                <a href="<?php echo url('News/detail',['id'=>$data['id']]); ?>" class="am-list-item-hd "><?php echo $data['title']; ?></a>
                <span class="am-list-date"><?php echo date('Y-m-d',$data['create_time']); ?></span>
            </li>
            <?php endforeach; endif; else: echo "暂无数据" ;endif; ?>

        </ul>
    </div>
</div>

<footer data-am-widget="footer" class="am-footer am-footer-default" data-am-footer="{  }">
    <div class="am-footer-switch"><?php $n=0; if(is_array($menu) || $menu instanceof \think\Collection || $menu instanceof \think\Paginator): $i = 0; $__LIST__ = $menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;if($vo['pos'] == 2): $n++; if(!(empty($vo['alias']) || (($vo['alias'] instanceof \think\Collection || $vo['alias'] instanceof \think\Paginator ) && $vo['alias']->isEmpty()))): $url=url($vo['model'].'/detail',['cate'=>$vo['alias']]); else: $url=url($vo['model'].'/index'); endif; if($n > 1): ?><span class="am-footer-divider"> | </span><?php endif; ?><a class="am-footer-desktop" href="<?php echo $url; ?>"><?php echo $vo['title']; ?></a>
        <?php endif; endforeach; endif; else: echo "" ;endif; ?>

    </div>
    <div class="am-footer-miscs ">

        <p>&copy;<?php echo date('Y'); ?>版权所有 <?php echo $site['title']; ?></p>
        <p>客服电话：<?php echo $site['telphone']; ?></p>
    </div>
    <div class="fang-footer-bar">
        <ul class="am-avg-sm-4">
            <li><a href="<?php echo url('Index/index'); ?>" <?php if($controller == "index"): ?>class="on"<?php endif; ?>><i class="am-icon-home am-icon-sm"></i><p>首页</p></a></li>
            <li><a href="<?php echo url('Loupan/index'); ?>" <?php if($controller == "loupan"): ?>class="on"<?php endif; ?>><i class="am-icon-building am-icon-sm"></i><p>新房</p></a></li>
            <li><a href="<?php echo url('Second/index'); ?>" <?php if($controller == "second"): ?>class="on"<?php endif; ?>><i class="am-icon-institution am-icon-sm"></i><p>二手</p></a></li>
            <li><a href="<?php echo url('user.index/index'); ?>"><i class="am-icon-user am-icon-sm"></i><p>我的</p></a></li>
        </ul>
    </div>
</footer>
<?php echo $site['mobileJs']; if(isset($ajaxdata)): ?>
<div id="loadingToast" class="am-hide">
    <div class="ylj-mask"></div>
    <div class="ylj-toast">
        <i class="ylj-loading weui-icon_toast"></i>
        <p class="ylj-toast__content">数据加载中</p>
    </div>
</div>
<script src="__PUBLIC__/js/layer/laytpl.js"></script>
<script>
    $(function(){
        $(window).scroll(function(){
            if(($(window).scrollTop() + $(window).height() > $(document).height()-10) && flag){
                var totalpage = $("#lists").data('total');
                if(totalpage > 1 && totalpage >= page){
                    $("#loadingToast").removeClass('am-hide');
                    getData();
                }else{
                    $("#loading-alt").removeClass('am-hide');
                    flag = false;
                }
            }
        });
    });
    function getData(){
        var url =  $("#lists").data('uri');
        $.get(url,params,function(data){
            $("#loadingToast").addClass('am-hide');
            if(data.status == 1){
                if(data.data){
                    var gettpl = document.getElementById('template').innerHTML;
                    laytpl(gettpl).render(data.data, function(html){
                        $('#lists').append(html);
                    });
                }else{
                    $('#lists').html('<li>暂无数据</li>');
                }

            }else{
                $("#loading-alt").removeClass('am-hide');
                flag = false;
            }
        });
        page++;
    }
</script>
<?php endif; ?>
</body>
</html>